﻿using System;
using TencentCloudOcrPlugin.Ocr;

namespace TencentCloudOcrPlugin
{
    public static class TencentCloudApiActionFactory
    {
        public static TencentCloudApiAction GetAction(TencentCloudApiOperationType operationType)
        {
            return operationType switch
            {
                TencentCloudApiOperationType.OcrBusinessCard => new OcrBusinessCardAction(),
                TencentCloudApiOperationType.OcrIdCard => new OcrIdCardAction(),
                TencentCloudApiOperationType.OcrBankCard => new OcrBankCardAction(),
                TencentCloudApiOperationType.OcrVehicleLicense => new OcrVehicleLicenseAction(),
                TencentCloudApiOperationType.OcrDriverLicense => new OcrDriverLicenseAction(),
                TencentCloudApiOperationType.OcrBizLicense => new OcrBizLicenseAction(),
                TencentCloudApiOperationType.OcrPassport => new OcrPassportAction(),
                TencentCloudApiOperationType.OcrVatInvoice => new OcrVatInvoiceAction(),
                _ => throw new NotImplementedException()
            };
        }
    }
}